<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<c:set var="ctxStatic" value="${pageContext.request.contextPath}/static" />
<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="height = device-height, width=device-width, initial-scale=1, user-scalable=no">
<link href="${ctxStatic}/jqmobile/jquery.mobile-1.4.3/jquery.mobile-1.4.3.min.css" rel="stylesheet">
<link rel="stylesheet" href="${ctxStatic}/kaka/css/ui-base.css">
<link rel="stylesheet" href="${ctxStatic}/kaka/css/ui-box.css">
<link rel="stylesheet" href="${ctxStatic}/kaka/css/ui-color.css">
<link rel="stylesheet" href="${ctxStatic}/kaka/css/ui-res.css">
<link rel="stylesheet" href="${ctxStatic}/kaka/css/ui-style.css">
<link rel="stylesheet" href="${ctxStatic}/kaka/css/layout.css">
<script src="js/zy_control.js"></script>
<script src="js/zy_click.js"></script>
<script src="${ctxStatic}/jquery/1.11.1/jquery-1.11.1.min.js"></script>
<script src="${ctxStatic}/jqmobile/jquery.mobile-1.4.3/jquery.mobile-1.4.3.min.js"></script>
</head>
<body class="um-vp c-wh" ontouchstart>
<div data-role="page" data-theme="none" id="page1">
  <div id="page_0" class="up ub ub-ver " tabindex="0">
    <div> 
      <!-- <h1 class="hbg ulev0 ut-s tx-c" tabindex="0"><span id="headtitle">活动店铺</span></h1> -->
      <div id="topToolBar" style="position: fixed; top: 0px; display: block; ">
        <form action="${ctx}/searchList" id="form" method="post" data-ajax="false">
          <input type="hidden" name="openid" value="${openid}">
          <input type="text" class="inputSearch" value="${text}" name="searchlist" data-role="none">
          <button class="btnSearch" type="submit" data-role="none">搜索店铺</button>
        </form>
      </div>
    </div>
    

    <!--content开始-->
    <div class="heiBar"></div>
    <div id="content" class="ub-f1 contentB">
      <div class="shopArea">
        <c:forEach items="${pager.list}" var="po">
          <div class="shopList"> <a href="http://dyywx.shijun.org/kakawx/shopIndex/${po.id}-${openid}" data-ajax="false">
            <c:choose>
              <c:when test="${po.head_image eq null or po.head_image eq '无' }">
                <div class="shopPic"><img src="${ctx}/images/logo_kaka.png">
                  <p class="praise">
                    <c:if test="${po.total_count eq null}">0</c:if>
                    ${po.total_count}个赞</p>
                </div>
              </c:when>
              <c:otherwise>
                <div class="shopPic"><img src="${serverUrl}${po.head_image}">
                  <p class="praise">
                    <c:if test="${po.total_count eq null}">0</c:if>
                    ${po.total_count}个赞</p>
                </div>
              </c:otherwise>
            </c:choose>
            <ul class="infoList">
              <li class="tittle">
                <c:if test="${po.shop_name eq null}">无</c:if>
                <c:if test="${fn: length(po.shop_name)>10}">${fn: substring(po.shop_name, 0, 11)}...</c:if>
                <c:if test="${fn: length(po.shop_name)<=10}">${po.shop_name}</c:if>
              </li>
              <li class="text_info">
                <c:if test="${po.address eq null}">无</c:if>
                <c:if test="${fn: length(po.address)>15}">${fn: substring(po.address, 0, 16)}...</c:if>
                <c:if test="${fn: length(po.address)<=15}">${po.address}</c:if>
              </li>
              <li class="text_prefer">
                <c:if test="${po.point_count eq null}">精彩活动即将推出，敬请关注！</c:if>
                ${po.point_count}
                <c:if test="${po.point_count ne null}">卡点赠送</c:if>
                <c:if test="${fn: length(po.exchange_content)>10}">${fn: substring(po.exchange_content, 0, 11)}...</c:if>
                <c:if test="${fn: length(po.exchange_content)<=10}">${po.exchange_content}</c:if>
              </li>
              <li class="text_info">可用卡点：
                <c:if test="${po.track eq null}">0</c:if>
                ${po.track}个</li>
              <li class="text_info">最近足迹：
                <c:if test="${po.time eq null}">还没有您的足迹哦！</c:if>
                <fmt:formatDate value="${po.time}" pattern="yyyy.MM.dd" type="date" dateStyle="long" />
              </li>
              <li></li>
            </ul>
            </a> </div>
        </c:forEach>
        <c:if test="${fn:length(pager.list)>0}"></c:if>
      </div>
    </div>
    <!--content结束--> 
    
  </div>
</div>
</body>
</html>
